//
//  BaseModel.h
//  RainbowFM
//
//  Created by Kratos on 14/12/9.
//  Copyright (c) 2014年 RB. All rights reserved.
//

#import <Foundation/Foundation.h>
//此类只能在非arc下使用，需要在ARC中BuildPhase -> Compile Sources加入flag -fno-objc-arc

@interface BaseModel : NSObject
- (id)initWithDataDic:(NSDictionary*)data;
- (NSDictionary*)attributeMapDictionary;
- (void)setAttributes:(NSDictionary*)dataDic;
- (NSString *)customDescription;
- (NSString *)description;
- (NSData*)getArchivedData;
- (NSString *)cleanString:(NSString *)str;

//按需更新部分对象属性 ,返回值为更新成功内容
-(NSMutableDictionary*)updateAttributes:(NSDictionary*)newAttributesDic;


-(NSMutableDictionary*)getDictionaryByAttributes;
@end
